package com.zyy.service;

import com.zyy.pojo.User;

import java.rmi.RemoteException;
import java.rmi.server.UnicastRemoteObject;

/**
 * @author zyy
 * @date 2021/1/26 下午6:06
 * @description
 */
public class HelloServiceImpl extends UnicastRemoteObject implements IHelloService{

    //手动实现父类的构造方法
    public HelloServiceImpl() throws RemoteException {
        super();
    }

    @Override
    //自定义的sayhello
    public String sayHello(User user) throws RemoteException{
        System.out.println("this is Server,say hello to "+ user.getUsername());
        return "success";
    }
}
